package com.zzy.collection.jdk8sort;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Student {
	private Long id;
	private String name;
	private String age;
	private Date birthday;
 
	public Student() {
	}
 
	public Student(Long id, String name, String age) {
		this.id = id;
		this.name = name;
		this.age = age;
	}
 
	public Student(String name, String age) {
		this.name = name;
		this.age = age;
	}
 
	public Student(String name, String age, Date birthday) {
		this.name = name;
		this.age = age;
		this.birthday = birthday;
	}
 
	public Long getId() {
		return id;
	}
 
	public void setId(Long id) {
		this.id = id;
	}
 
	public String getName() {
		return name;
	}
 
	public void setName(String name) {
		this.name = name;
	}
 
	public String getAge() {
		return age;
	}
 
	public void setAge(String age) {
		this.age = age;
	}
 
	public Date getBirthday() {
		return birthday;
	}
 
	public String getBirthdayStr() {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
		return sdf.format(birthday);
	}
 
	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
 
	@Override
	public String toString() {
		return "Student [name=" + name + ", age=" + age + ", birthday=" + getBirthdayStr() + "]";
	}
}